/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vale.sax;

/**
 *
 * @author juan
 */
public final class SaxException extends Exception {

    public static final byte WARNING = 0;
    public static final byte ERROR = 1;
    public static final byte FATAL_ERROR = 2;
    private byte type;

    /**
     * Creates a new instance of <code>SaxException</code> without detail message.
     */
    public SaxException(byte type) {
        this.type = type;
    }

    /**
     * Constructs an instance of <code>SaxException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public SaxException(byte type, String msg) {
        super(msg);
        this.type = type;
    }

    public SaxException(byte type, Exception ex) {
        super(ex.getMessage());
        this.type = type;
    }

    public byte getType() {
        return this.type;
    }
}
